'''
Created on Apr 6, 2013

@author: kevinbauer
'''

class Validate(object):

    def __init__(self, r, f):
        self.results = r
        self.facts = f
        
    def compare(self):
        tp = 0 # true positive
        tn = 0 # true negative
        fp = 0 # false positive
        fn = 0 # false negative
        
        for i in range(len(self.facts)):
            if self.facts[i] == self.results[i]:
                if self.results[i] == 1:
                    tp += 1
                else:
                    tn += 1
            else:
                if self.results[i] == 0:
                    fn += 1
                else:
                    fp += 1
                    
        print "True Positives: ", tp, "\n"
        print "True Negatives: ", tn, "\n"
        print "False Positives: ", fp, "\n"
        print "False Negatives: ", fn, "\n"
                